package com.eternal.advance;

import android.content.Context;
import androidx.constraintlayout.widget.ConstraintLayout;
import android.util.AttributeSet;
import android.view.MotionEvent;

import com.eternal.framework.utils.KLog;

public class ClickConstraintLayout extends ConstraintLayout {
    public ClickConstraintLayout(Context context) {
        super(context);
    }

    public ClickConstraintLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public ClickConstraintLayout(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        if(event.getAction()==MotionEvent.ACTION_MOVE){
            KLog.e("on moved");
            return false;
        }else if(event.getAction()==MotionEvent.ACTION_DOWN){
            KLog.e("on down");
            super.onTouchEvent(event);
        }else if(event.getAction()==MotionEvent.ACTION_UP){
            KLog.e("on up");
            super.onTouchEvent(event);
        }
        return false;
    }
}
